#ifndef RtWeiboEngine_H
#define RtWeiboEngine_H

#include "RtBase.h"
#include "RtEvtReceiver.h"

class CRespReceiver
{
public:
	CRespReceiver(CRtEvtReceiver* pReceiver,const CRtString& strAction)
	{
		m_pReceiver=pReceiver;
		m_strAction=strAction;
	}

public:
	CRtEvtReceiver* m_pReceiver;
	CRtString m_strAction;
};

class CRtWeiboEngine
{
public:
	CRtWeiboEngine();
	virtual ~CRtWeiboEngine();

	bool AuthoriseValid();
	void ShowError(int error_code,const char* error);

	//authorise
	void Oauth2Web();

	//
	void PostStatusesUpdate(const char* statusText,const CRespReceiver& rRespReceiver=CRespReceiver(NULL,""));
    char* GetStatusesFriendTimeline(const CRespReceiver& rRespReceiver=CRespReceiver(NULL,""));
public:
	bool m_bLogin;
	CRtTime m_tAuthorizeTime;
	int m_nExpired;
};

#endif